package cn.sykj.car.filter;

import com.alibaba.fastjson.serializer.ValueFilter;

import java.math.BigDecimal;

public class BigDecimalValueFilter implements ValueFilter {
    @Override
    public Object process(Object object,String name,Object value) {
        if(null != value && value instanceof BigDecimal){
            String formatValue = ((BigDecimal)value).setScale(2, BigDecimal.ROUND_HALF_EVEN).toPlainString();
            return formatValue;
        }
        return "";
    }
}
